package com.cloud.adrian.novel.author.novel.dto.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * 作者注册请求DTO
 * @Author: xiangguiliang
 * @version: 1.0
 * @since: 2024/05/29
 */
@Data
public class AuthorRegisterReqDto {
    @Schema(hidden = true)
    private Long userId;

    @Schema(description = "作家笔名", required = true)
    @NotBlank(message = "笔名不能为空")
    private String penName;

    @Schema(description = "手机号码", required = true)
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    private String telPhone;

    @Schema(description = "qq、微信账号", required = true)
    @NotBlank(message = "账号不能为空")
    private String chatAccount;

    @Schema(description = "邮箱", required = true)
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    @Schema(description = "作品方向0-男频 1-女频", required = true)
    @NotNull(message = "作品方向不能为空")
    @Min(0)
    @Max(1)
    private Integer workDirection;
}
